package com.vhall.component.dao.room;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vhall.component.entity.record.RecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author guoxin.wang
 * @date 2021/6/30 15:00
 */
@Repository
@Mapper
public interface RecordOfRoomMapper extends BaseMapper<RecordEntity> {

    /**
     * 查询音视频信息
     *
     * @param vodId
     * @return
     */
    @Select("select * from record where vod_id = #{vodId} order by updated_at desc limit 1")
    RecordEntity findByVodId(@Param("vodId") String vodId);

}
